<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('广告主主体资质列表')" />
</head>
<body class="gray-bg">
    
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
                            <li>
                                广告主id：<input type="text" name="advertiserId"/>
                            </li>
                            <li>
                                公司名称：<input type="text" name="companyName"/>
                            </li>
                            <li>
                                对公验证类型：<input type="text" name="companyType"/>
                            </li>
                            <li>
                                公司类型，1企业，2个人：<input type="text" name="checkType"/>
                            </li>
                            <li>
                                资质类型：<input type="text" name="qualificationType"/>
                            </li>
                            <li>
                                资质编号：<input type="text" name="qualificationCode"/>
                            </li>
                            <li>
                                注册国家：<input type="text" name="registeredNationName"/>
                            </li>
                            <li>
                                注册省份：<input type="text" name="registeredProvinceName"/>
                            </li>
                            <li>
                                注册城市：<input type="text" name="registeredCityName"/>
                            </li>
                            <li>
                                是否有有效日期：<input type="text" name="hasEffectiveDate"/>
                            </li>
                            <li>
                                法人：<input type="text" name="proprietorName"/>
                            </li>
                            <li>
                                详细地址：<input type="text" name="address"/>
                            </li>
                            <li>
                                状态：<input type="text" name="status"/>
                            </li>
                            <li>
                                拒绝理由：<input type="text" name="rejectReason"/>
                            </li>
                            <li>
                                资质图片附件id：<input type="text" name="attachmentId"/>
                            </li>
                            <li>
                                资质图片地址：<input type="text" name="pictureUrl"/>
                            </li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm" id="toolbar" role="group">
				<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="dsp:subject:add">
					<i class="fa fa-plus"></i> 添加
				</a>
				<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="dsp:subject:edit">
					<i class="fa fa-edit"></i> 修改
				</a>
				<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="dsp:subject:remove">
					<i class="fa fa-remove"></i> 删除
				</a>
				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="dsp:subject:export">
						<i class="fa fa-download"></i> 导出
				 </a>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('dsp:subject:edit')}]];
        var removeFlag = [[${@permission.hasPermi('dsp:subject:remove')}]];
        var prefix = ctx + "dsp/subject";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
                modalName: "广告主主体资质",
				search: false,
		        showExport: false,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'qualificationId', 
					title : '资质id',
					visible: false
				},
				{
					field : 'advertiserId', 
					title : '广告主id',
					sortable: true
				},
				{
					field : 'companyName', 
					title : '公司名称',
					sortable: true
				},
				{
					field : 'companyType', 
					title : '对公验证类型',
					sortable: true
				},
				{
					field : 'checkType', 
					title : '公司类型，1企业，2个人',
					sortable: true
				},
				{
					field : 'qualificationType', 
					title : '资质类型',
					sortable: true
				},
				{
					field : 'qualificationCode', 
					title : '资质编号',
					sortable: true
				},
				{
					field : 'registeredNationName', 
					title : '注册国家',
					sortable: true
				},
				{
					field : 'registeredProvinceName', 
					title : '注册省份',
					sortable: true
				},
				{
					field : 'registeredCityName', 
					title : '注册城市',
					sortable: true
				},
				{
					field : 'hasEffectiveDate', 
					title : '是否有有效日期',
					sortable: true
				},
				{
					field : 'proprietorName', 
					title : '法人',
					sortable: true
				},
				{
					field : 'address', 
					title : '详细地址',
					sortable: true
				},
				{
					field : 'status', 
					title : '状态',
					sortable: true
				},
				{
					field : 'rejectReason', 
					title : '拒绝理由',
					sortable: true
				},
				{
					field : 'attachmentId', 
					title : '资质图片附件id',
					sortable: true
				},
				{
					field : 'pictureUrl', 
					title : '资质图片地址',
					sortable: true
				},
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.qualificationId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.qualificationId + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>